#/bin/bash

system=$1
mode=$2

rm -rf ./dist/*
rm -rf ./out/*

npx electron-vite build --mode ${mode}

npx electron-builder --${system} --config

cross-env NODE_ENV=${mode} node ./scripts/electron/upload.js --${system}
